#!/usr/bin/perl
use ExtUtils::testlib;
use Wiimote;

print qq!
         test.pl - libcwiimote perl module test application

         A    - hold to Enable accelerometer
         1    - hold to Enable rumble
         Home - Exit

        Press buttons 1 and 2 on the wiimote now to connect.
!;


#print "Connect " . Wiimote::c_wiimote_connect('00:19:1D:75:CC:30');
print "Connect " . Wiimote::c_wiimote_connect('00:19:1D:A0:F7:95');
print "\n-------------------\n";

print "Is open: " . Wiimote::wiimote_is_open();
print "\n-------------------\n";
while ( Wiimote::wiimote_is_open()  ) {
    Wiimote::wiimote_update();

   # print "Wiimote Key bits: " . $wii->get_wiimote_keys_bits();
    print "\n";

}
